package com.example.LifeCycle.PostConStructBean;

import com.example.LifeCycle.commons.Car;
import com.example.LifeCycle.commons.Dog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description TODO
 * @Date 2024/5/15 11:02
 * @Created by houjunfeng
 */
@Configuration
public class PostConStructBeanConfigeration {
    //容器启动时创建对象，并在对象创建好和属性设置好值以后 执行初始化方法@PostConStruct，容器移除对象之前调用销毁方法@PreDestroy
    @Bean(name="Dog")
    public Dog getDog(){
        return  new Dog();
    }
}
